#pragma once
#include <boost/array.hpp>
#include "Unit.hpp"

namespace he
{
	//! Armored fighting vehicle.
	class UnitAFV : public Unit
	{
		// Enums
	public:
		//! Armor location.
		enum ArmorLocation
		{
			AL_FRONT = 0,
			AL_SIDE = 1,
			AL_REAR = 2,
			AL_TOP_BOTTOM = 3
		};

		// Typedefs
		private:
		typedef std::pair<unsigned short, short> ArmorPair_t;
		typedef boost::array<ArmorPair_t, 4> ArmorArray_t;

		// Attributes
	private:
		//! Onroad speed.
		unsigned short const m_SpeedOnroad;
		//! Offroad speed.
		unsigned short const m_SpeedOffroad;
		//! Superstructure armor.
		ArmorArray_t m_SuperstructureArmor;
		//! Hull armor;
		ArmorArray_t m_HullArmor;

		// Operations
	public:
		//! Set superstructure armor.
		void set_superstructure_armor(ArmorLocation Location, unsigned short Thickness, short Angle);
		//! Set hull armor.
		void set_hull_armor(ArmorLocation Location, unsigned short Thickness, short Angle);

		// Construction/Destruction
	public:
		UnitAFV(std::string const &Name, unsigned short const SpeedOnroad, unsigned short const SpeedOffroad, TerrainTile *pTile, LookDirection LookDirection_);
	};
} /*he*/
